package com.ais.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.ais.service.TerminalManage;
import com.ais.vo.Terminal;

@Controller
@RequestMapping("/Terminal")
public class TerminalController {
	@Autowired
	private TerminalManage terminalManage;
	
	@RequestMapping("/toAddTerminal.do")
	public ModelAndView toAddTerminal(){
		return new ModelAndView("addTerminal");
	}
	public void setTerminalManage(TerminalManage terminalManage) {
		this.terminalManage = terminalManage;
	}
	@RequestMapping("/addTerminal.do")
	public String addTerminal(HttpServletRequest request,
			HttpServletResponse response,Terminal terminal){
		this.terminalManage.addTerminal(terminal);
		return null;
	}
}

